import React from 'react';
import { Tooltip } from 'antd';
import { tisMap } from './confings';
import { ExclamationCircleOutlined } from '@ant-design/icons';

type nameKey = typeof tisMap;

const TipMessage = ({ name, children }: { name: keyof nameKey; children: React.ReactNode }) => {
  return (
    <div>
      {children}
      <Tooltip title={tisMap[name]}>
        <ExclamationCircleOutlined style={{ marginLeft: 4, color: '#c3c3c3' }} />
      </Tooltip>
    </div>
  );
};

export default TipMessage;
